# Maintainer:
pkgname=airspyone-host
pkgver=1.0.10
pkgrel=1
pkgdesc="AirSpy's usemode driver and associated tools"
url="https://github.com/airspy/airspyone_host"
# same as gr-osmosdr
arch="aarch64 armv7 x86_64"
license="GPL-2.0-or-later"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="
	cmake
	libusb-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/airspy/airspyone_host/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/airspyone_host-$pkgver"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -O2 -flto=auto -DNDEBUG" \
	CXXFLAGS="$CXXFLAGS -O2 -flto=auto -DNDEBUG" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_INSTALL_RPATH=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
61ea82e8b9892053b6fdccd7de05f248145bb5da0d4f63bb31d3a815fa739b248662a875d53d88de260cfa2a98ef266ea165ba50397e67822ea21ca273c93b24  airspyone-host-1.0.10.tar.gz
"
